package com.yy.okhttp.chain;

import com.yy.okhttp.ConnectionPoll;
import com.yy.okhttp.HttpUrl;
import com.yy.okhttp.Interceptor;
import com.yy.okhttp.InterceptorChain;
import com.yy.okhttp.Request;
import com.yy.okhttp.Response;
import com.yy.okhttp.YYOkHttpClient;

import java.io.IOException;

/**
 * User: gongyongfeng2@yy.com
 * Date: 2020/7/29 15 :33
 */
public class ConnectionInterceptor implements Interceptor {
    @Override
    public Response intercept(InterceptorChain chain) throws IOException {
        Request request = chain.call().request();
        YYOkHttpClient client = chain.call().client();
        HttpUrl url = request.getUrl();
        String host = url.getHost();
        int port = url.getPort();
        ConnectionPoll connectionPoll = client.getConnectionPoll();
        return null;
    }
}
